<?php

namespace app\admin\controller;
use app\admin\service\MenuService;
use  app\common\controller\DBase;
use  app\common\controller\PCBase;
use  think\facade\Request;
use  app\admin\logic\AdminLogic;
class Task extends PCBase
{

    /**
     * 初始化后台接口地址
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function initIndex()
    {

        $menuService = new MenuService($this->getAdminId());
        $data = [
            'siteConfig' => sysconfig('site'),
            'menuInfo' => $menuService->getMenuTree(),
        ];
        return $this->jsonMessage(200,true,'获取成功',$data);
    }



}